NEUFEP-ME study: Functional Data Quality - summary processing pipeline

This document contains the code for data quality checks on the 28 participants in this study. This pipeline allows the generation of interactive visualizations, to be loaded and viewed using the neufep_me_qc_visualize notebook.

A reminder of the study setup. Data per participant was collected in a single session. This included a single T1w image and 6 functional runs in the following order:

  1. Rest Run 1
  2. Motor Run 1 (right-hand finger tapping)
  3. Emotion Run 1 (matching shapes and faces)
  4. Rest Run 2
  5. Motor Run 2 (imagined right-hand finger tapping)
  6. Emotion Run 2 (recalling an emotional event)

Below are images to summarise, for all participants, the:

The code can be ignored, unless you are really interested in seeing how the images were generated :)

Preparation

Import required Python packages

Directories

Load all subjects

['sub-001',
 'sub-002',
 'sub-003',
 'sub-004',
 'sub-005',
 'sub-006',
 'sub-007',
 'sub-010',
 'sub-011',
 'sub-012',
 'sub-013',
 'sub-015',
 'sub-016',
 'sub-017',
 'sub-018',
 'sub-019',
 'sub-020',
 'sub-021',
 'sub-022',
 'sub-023',
 'sub-024',
 'sub-025',
 'sub-026',
 'sub-027',
 'sub-029',
 'sub-030',
 'sub-031',
 'sub-032']

Experiment parameters

Framewise displacement (FD)

Create summary FD files per subject

Create a single summary FD file (all subjects, all runs)

Load and plot summary data for framewise displacement

Plot FD dsitribution plots for all participants over all runs

Distribution plots for framewise displacement for sub-001 and sub-010, all runs

Temporal signal-to-noise ratio (tSNR)

Interactive tSNR visualization of {sub-001_task-emotion_run-1}

/Users/jheunis/miniconda3/envs/rtme-fmri/lib/python3.7/site-packages/nilearn/image/resampling.py:543: RuntimeWarning:

NaNs or infinite values are present in the data passed to resample. This is a bad thing as they make resampling ill-defined and much slower.

Ridge plots for tSNR values in different tissue masks using different echo cobinations

Task activation

/Users/jheunis/miniconda3/envs/rtme-fmri/lib/python3.7/site-packages/nilearn/plotting/js_plotting_utils.py:103: UserWarning:

It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.

/Users/jheunis/miniconda3/envs/rtme-fmri/lib/python3.7/site-packages/nilearn/plotting/js_plotting_utils.py:103: UserWarning:

It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.

/Users/jheunis/miniconda3/envs/rtme-fmri/lib/python3.7/site-packages/nilearn/plotting/js_plotting_utils.py:103: UserWarning:

It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.

/Users/jheunis/miniconda3/envs/rtme-fmri/lib/python3.7/site-packages/nilearn/plotting/js_plotting_utils.py:103: UserWarning:

It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.